{% load i18n %}
{% load product_first_image from product_images %}

<form action="{% url 'dashboard:product-image-delete' product_pk=product.pk img_pk=product_image.pk %}" method="post" novalidate>
  {% csrf_token %}
  <input type="hidden" name="success_url" value="{% url 'dashboard:product-update' pk=product.pk %}#images">
  <div class="modal-content">
    <div class="row">
      <div class="col s12">
        <h5>
          {% trans "Are you sure?" context "Dashboard confirmation modal" %}
        </h5>
      </div>
    </div>
    <div class="center-align">
      <img class="responsive-img" src="{% product_first_image product size="255x255" method="crop" %}" 
           srcset="{% product_first_image product size="255x255" method="crop" %} 1x, {% product_first_image product size="510x510" method="crop" %} 2x" 
           alt="">
    </div>
    <p>
      {% blocktrans trimmed context "Modal delete image text" %}
        You are about to delete this image.
      {% endblocktrans %}
    </p>
  </div>
  <div class="modal-footer">
    <button type="submit" class="modal-action btn-flat">
      {% trans "Delete" context "Dashboard delete action" %}
    </button>
    <a href="#!" class="modal-action modal-close btn-flat">
      {% trans "Cancel" context "Dashboard cancel action" %}
    </a>
  </div>
</form>
